﻿using nanhua.BookStore.DomainServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;

namespace nanhua.BookStore.Entitys.ProductCategoryAggregate
{
    public class ProductCategory : AggregateRoot<Guid>, IHasCreationTime
    {
        /// <summary>
        /// 产品编码
        /// </summary>
        public virtual string Code { get; private set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public virtual string Name { get; private set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        public virtual Guid ParentId { get; private set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime CreationTime { get; private set; }

        protected ProductCategory() 
        {
            this.CreationTime = DateTime.Now;
        }
        internal ProductCategory(Guid id,string code,string name, Guid parentId = default(Guid)) :base(id)
        {
            this.Code = code;
            this.Name = name;
            this.ParentId = parentId;
        }


    }
}
